package com.lin.mapper;

import com.lin.pojo.Form;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FormMapper {
    public List<Form> SelectPage(Integer pageNum,Integer pageSize,String username);
    public List<Form> SelectPage_All(Integer pageNum,Integer pageSize);
    public Integer SelectCount(String username);

    public Integer SelectCount_All();
    public Form Select_ById(Integer formid);

    public Integer Insert(Integer tableid,String username,String detail,Integer totalPrice);

    public Integer Delete(Integer formid);

    public Integer Update_Begin(Integer formid);

    public Integer Update_End(Integer formid);

    public Integer Update_totalTime(Integer formid);

    /*********************** 管理端 *********************************/
    public Double SelectAvg();
    public Integer SelectIncome();

    public Integer SelectCount_TI();
    public List<Integer> Select_Formid(Integer pageNum,Integer pageSize);
    public List<Integer> Select_Totaltime(Integer pageNum,Integer pageSize);
    public List<Integer> Select_Income(Integer pageNum,Integer pageSize);

    public Integer SelectCount_MealTime(Integer time);          //以time为时间段开始，以3个小时为一个时间段，查找用餐人数
    public Integer SelectCount_Work(Integer day);          //以当前时间开始，查找前七天每天的用餐人数
    /*********************** 管理端 *********************************/

}
